package com.shop2cn.iapi.sqpayment.testcase;

import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.sqpayment.parameter.AcquireOrderBean;
import com.shop2cn.iapi.sqpayment.parameter.BatchCheckPaymentBean;
import com.shop2cn.iapi.sqpayment.service.BatchCheckPaymentCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.SQPayGateWayCallService;
import com.ymttest.database.model.MPayment;
import com.ymttest.database.sqlwapper.SQPayGateWayWapper;
import com.ymttest.utils.TestDataManager;
/**
*批量对账回调
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_BatchCheckPayment{
	private static BatchCheckPaymentBean batchCheckPaymentBean;
	private static BatchCheckPaymentCall batchcheckpaymentCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("批量对账回调");
	}

	@Before
	public void caseUp() {
		batchCheckPaymentBean=new BatchCheckPaymentBean();
		batchcheckpaymentCall=new BatchCheckPaymentCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(batchcheckpaymentCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_BatchCheckPayment_001() {
		Logger.start(true,"批量对账回调成功");
		try {
			batchCheckPaymentBean.setBizId(TestDataManager.getRandomUUID().toString());
			batchcheckpaymentCall.setData(batchCheckPaymentBean);
			batchcheckpaymentCall.callService();			
			//TODO 查看日志
			Logger.verifyEquals("ok", batchcheckpaymentCall.getReturnData(), "验证return");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}